<?php
include_once BXD_INCLUDEPATH . 'lib/database/DBFactory.php';
include_once BXD_INCLUDEPATH . 'lib/entity/Entity.php';
include_once BXD_INCLUDEPATH . 'lib/entity/EntityUtils.php';
include_once BXD_INCLUDEPATH . 'lib/entity/EntityType.php';

/**
 * Inizializzazione delle variabili con istanze di DBFactory e EntityUtils
 *
 * @author Damiano Ciarla
 * @version 1.0
 * @category lib/entity
 */
class EntityManagerMini
{
	protected $db			= NULL;
	protected $entityUtils	= NULL;

	public function __construct($dbName = NULL)
	{
		try
		{
			if($dbName === NULL) $dbName = "DBDefault";

			$this->db = DBFactory::getConnection($dbName);
		}
		catch (DatabaseConnectionErrorException $e)
		{
			echo $e->getTraceAsString();
		}

		$this->entityUtils = EntityUtils::getInstance();
	}
}
?>
